<template>
  <div>
    <Header></Header>
    <div id="partial" class="container display fade in mt-5" data-display-name="navs">
      <div class="section">
        <div class="list with-divider">
          <a class="item with-avatar" @click="jumpToModName">
            <div class="avatar text-gray"><i class="icon-user"></i></div>
            <div class="title">修改用户名</div>
            <i class="icon icon-chevron-right muted"></i>
          </a>
          <a class="item with-avatar" @click="jumpToUpload">
            <div class="avatar text-gray"><i class="icon-upload"></i></div>
            <div class="title">上传书籍</div>
            <i class="icon icon-chevron-right muted"></i>
          </a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Header from './components/Header.vue'

export default {
  components: {
    Header
  },
  data() {
    return {
      name: this.$store.state.name
    }
  },
  methods: {
    jumpToUpload() {
      this.$router.push({ path: '/upload', query: { tab: '上传书籍' } })
    },
    jumpToModName() {
      this.$router.push({ path: '/modname', query: { tab: '修改用户名' } })
    }
  }
}
</script>

<style lang="scss" scoped>
.profile-header {
  position: relative;
  overflow: hidden;
  min-height: 8rem;

  .back {
    top: -2rem;
    left: -2rem;
    right: -2rem;
    bottom: -2rem;
    background-position: center;
    background-size: cover
  }

  .front {
    background: rgba(0, 0, 0, .1);
    text-align: center;
    padding: 1.5rem
  }
}

.lead_1 {
  font-size: 0.2rem;
  font-weight: 300;
}</style>
